{% extends 'base.html' %}

{% block title %}
	{{ page }}
{% endblock %}

{% block menu %}
	<div class="menu">
	<table id="main_menu">
	<tr>
	{% for key, value in menus.items() %}
		<td>
		<a href= "{{url_for(key)}}" >
            <h2>{{ value }}</h2>
        </a>
		</td>
	{% endfor %}
	</tr>
	</table>
	</div>
{% endblock %}

{% block container %}
	<div class="container">
    	<h1> {{ page }} </h1>
	</div>
	<div>
		<h2> {{ text }} </h>
	</div>
<div class="form">
<form method="post">
{% if 'select_device' in form %}
{{ selDMX.csrf_token() }}
	<div>
	{{ selDMX.list_dmx.label }}
	{{ selDMX.list_dmx }}
	</div>
	<div>
	{{ selDMX.sel_dmx }}
	</div>
	</form>
{% elif 'change_device' in form %}
{{ changeDMX.csrf_token() }}
	<div>
	{{ changeDMX.list_channel.label }}
	{{ changeDMX.list_channel }}
	<br>
	{{ changeDMX.name_channel.label }}
	{{ changeDMX.name_channel }}
	</div>
	<div>
	{{ changeDMX.save_channel }}
	{{ changeDMX.finish_edit }}
	</div>
	</form>
{% endif %}
</form>
</div>
{% endblock %}

{% block content %}
{% endblock %}

{% block foot %}
	<div class="foot">
		<a>
		{% for txt in foot %}
			{{ txt }}
			<br>
		{% endfor %}
		</a>
		<a href="{{ url }}" target="_blank">Сайт проекта</a>
	</div>
{% endblock %}

